package com.loongtech.bi.entity.player;

import com.loongtech.core.util.Time;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name = "role_school_120day_left")
public class EntityRoleSchool120DayLeft extends TypeLeft implements Serializable {
	private static final long serialVersionUID = 2L;

	@Id
	private Date day; // 日期
	@Id
	private String serverid;
	@Id
	private String channelid;
	@Id
	private String platformid;
	@Id
    private int school;

	@Column(columnDefinition="int(11) NOT NULL default 0")
	private int rolecreate;
	@Column(columnDefinition="int(11) NOT NULL default 0")
	private int roleactive;
	@Column(columnDefinition="float NOT NULL default 0.0")
	private float leftrate;
	
	public String getKey() {
		return Time.getDateStr(day) + "-" + platformid + "-" + channelid + "-" + serverid;
	}

	public Date getDay() {
		return day;
	}

	public void setDay(Date day) {
		this.day = day;
	}

	public String getServerid() {
		return serverid;
	}

	public void setServerid(String serverid) {
		this.serverid = serverid;
	}

	public String getChannelid() {
		return channelid;
	}

	public void setChannelid(String channelid) {
		this.channelid = channelid;
	}

	public String getPlatformid() {
		return platformid;
	}

	public void setPlatformid(String platformid) {
		this.platformid = platformid;
	}

    public int getSchool() {
        return school;
    }

    public void setSchool(int school) {
        this.school = school;
    }

    public int getRolecreate() {
        return rolecreate;
    }

    public void setRolecreate(int rolecreate) {
        this.rolecreate = rolecreate;
    }

    public int getRoleactive() {
        return roleactive;
    }

    public void setRoleactive(int roleactive) {
        this.roleactive = roleactive;
    }

    public float getLeftrate() {
        return leftrate;
    }

    public void setLeftrate(float leftrate) {
        this.leftrate = leftrate;
    }
}